home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d1 / bnchutil.arc / ATTR.DOC < prev    next >
Text File  |  1991-04-30  |  3KB  |  64 lines

  1. ATTR (Attribute)                       Charles Petzold
  2.  
  3. Purpose:  ATTR.COM permits display and modification of the archive, system,
  4.           hidden, and read-only file attributes.
  5.  
  6. Format:   ATTR
  7.             or
  8.           ATTR *.*
  9.             or
  10.           ATTR [+A|-A] [+S|-S] [+H|-H] [+R|-R]
  11.           [d:][path]filename[.ext]
  12.  
  13. Remarks:  Entering ATTR without any parameters, as in the first format shown
  14.           above, produces a help display (essentially identical to the third
  15.           form above) that shows which file attributes can be changed.
  16.  
  17.           ATTR.COM permits the use of the global ? and * characters (as in the
  18.           second format above).  Entering ATTR filename displays a specific
  19.           file's attributes.  For example,
  20.  
  21.                ATTR IBMBIO.COM
  22.  
  23.           returns the display
  24.  
  25.                IBMBIO.COM    Arc     Sys Hid R-O
  26.  
  27.           showing that the Archive, System, Hidden, and Read-Only bits of the
  28.           attribute byte are set for this file.
  29.  
  30.           When wildcards are used to list the attributes of all the files in a
  31.           directory, subdirectory names are shown as Dir (between the Arc and
  32.           Sys in the example above).  Unlike the DOS DIR command, ATTR lists
  33.           hidden files, whether sought by specified filename or through a *.*
  34.           listing.  However, ATTR does not show Volume names or the dot and
  35.           double dot entries in subdirectories.
  36.  
  37.           The syntax for changing file attributes is indicated in the third
  38.           format above.  After typing ATTR (and a space) you simply precede the
  39.           file specification with a plus or minus sign, followed by the letter
  40.           A (Archive), S (System), H (Hidden), or R (Read-Only).  A plus sign
  41.           turns on the specified attribute; a minus sign turns it off.  More
  42.           than one attribute can be changed at once, and the attribute
  43.           designating letters may be entered in any order and in upper or
  44.           lowercase.  No space may be used between the plus or minus and the
  45.           letter that follows it, however.
  46.  
  47. Example:  To convert the file 85TAX.WKS to hidden and read-only, you
  48.           would enter
  49.  
  50.           ATTR +H +R 85TAX.WKS
  51.  
  52.           Since DOS itself normally sets the Archive bit, entering
  53.  
  54.                 ATTR 85TAX.WKS
  55.  
  56.           would produce the display
  57.  
  58.                85TAX.WKS     Arc         Hid R-O
  59.  
  60.           Since the Hidden attribute has been set, however, the  DIR command
  61.           will produce the message, "File not found."  And since the Read-Only
  62.           flag has also been set, a DEL command will produce the message,
  63.           "Access denied."
  64.